<template>
	<view class="site">
		<view class="site_title">
			<view class="title_left">
				{{title}}
			</view>
			<view class="title_right" v-if="more" @click="routeMore">
				<text class="size">{{more}}</text>
				<image :src="$IMG_URL('/static/home/indicate.png')" mode="" class="icon"></image>
			</view>
		</view>
		<view class="comlum_box">
			<view v-for="(item,index) in siteList" :key="index" class="item_box" @click="$ROUTELINK('/pageA/shop/particulars?shop_id=' + item.shop_id)">
				<image :src="item.category_image" mode="aspectFill" class="tag-img" v-if="item.category_image"></image>
				<view class="title">
					{{item.name}}
				</view>
				<view class="tag_box" v-if="item.is_recently">
					{{item.is_recently ? '最近':''}}
				</view>
				<view class="flex">		
				</view>
				<view class="distance">
					<view class="size_s">
						{{item.distance}}
					</view>
					<u-icon name="arrow-right" color="#999999" size="14"></u-icon>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default{
		props: {
			more:{
				type: String,
				default: '',
				required: true
			},
			title:{
				type: String,
				default: '',
				required: true
			},
			siteList: {
				type: Array,
				default: [],
				required: true
			}
		},
		methods:{
			routeMore(){
				this.$emit('routeMore')
			}
		}
	}
</script>

<style lang="scss" scoped>
	.site{
		width: 702rpx;
		background: #ffffff;
		border-radius: 16rpx;
		padding: 20rpx 24rpx;
		display: flex;
		flex-direction: column;
		margin-bottom: 24rpx;
		.site_title{
			display: flex;
			flex-direction: row;
			align-items: center;
			margin-bottom: 24rpx;
			.title_left{
				font-size: 32rpx;
				font-family: PingFang SC, PingFang SC-Heavy;
				font-weight: 800;
				text-align: left;
				color: #333333;
				flex: 1;
			}
			.title_right{
				display: flex;
				flex-direction: row;
				align-items: center;
				.size{
					font-size: 24rpx;
					font-family: PingFang SC, PingFang SC-Medium;
					font-weight: 500;
					color: #999999;
				}
				.icon{
					width: 10rpx;
					height: 16rpx;
					margin-left: 7rpx;
				}
			}
		}
		.comlum_box{
			display: flex;
			flex-direction: column;
			align-items: center;
			width: 100%;
			.item_box{
				display: flex;
				flex-direction: row;
				align-items: center;
				width: 100%	;
				margin-bottom: 24rpx;
				.tag-img{
					width: 106rpx;
					height: 32rpx;
					margin-right: 12rpx;
				}
				
				.title{
					font-size: 28rpx;
					font-family: PingFang SC, PingFang SC-Medium;
					font-weight: 500;
					text-align: left;
					color: #333333;
					margin-right: 10rpx;
				}
				.tag_box{
					width: 52rpx;
					height: 30rpx;
					background: #f6f6f6;
					border-radius: 4rpx;
					font-size: 20rpx;
					font-family: PingFang SC, PingFang SC-Medium;
					font-weight: 500;
					text-align: left;
					color: #666666;
					display: flex;
					align-items: center;
					justify-content: center;
				}
				
				.flex{
					flex: 1;
				}
				
				.distance{
					display: flex;
					flex-direction: row;
					align-items: baseline;
					.size_s{
						font-size: 24rpx;
						font-family: PingFang SC, PingFang SC-Medium;
						font-weight: 500;
						color: #999999;
					}
					
				}
			}
		}
	}
</style>